<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
<script>
$(document).ready(function() {
	saveChecklist();
	getChecklist();
});

function getChecklist() {
    $.getJSON("checklist/abhishek", function(checklist) {
        alert(checklist[0].userId);
    });
}

function saveChecklist() {
	$.ajax({
		url: "checklist",
		type: "POST",
		data: '[{"userId":"abhishek","groupId":"grocery","tasks":["onion","potatoes"]}]',
		dataType: "json",
		contentType: "application/json"	
	});
}
</script>
</head>
<body>
  <p id="hello">Hello World</p>
</body>
</html>